# install httpd
yum install -y httpd

# change servername: 
vim /etc/httpd/conf/httpd.conf
ServerName 192.168.141.22:80

# start httpd
service httpd start
chkconfig --levels 235 httpd on


# install mysql
yum install -y mysql-server
service mysqld start
chkconfig --levels 235 mysqld on
mysqladmin -u root password '123654ax'

mysql -uroot -p123654ax
CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;


# 64bit
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
yum install php54w.x86_64 php54w-cli.x86_64 php54w-common.x86_64 php54w-gd.x86_64 php54w-ldap.x86_64 
yum install php54w-mbstring.x86_64 php54w-mcrypt.x86_64 php54w-mysql.x86_64 php54w-pdo.x86_64

# 32bit
rpm -Uvh http://repo.webtatic.com/yum/el6/latest.rpm  
yum install php54w php54w-cli php54w-common php54w-ldap php54w-mbstring php54w-mcrypt php54w-pear php54w-odbc  
yum install php54w-xml  php54w-pdo  php54w-gd php54w-mysql


# restart httpd
service httpd restart


cd /var/www/html/
wget http://oss.aliyuncs.com/aliyunecs/onekey/phpMyAdmin-4.1.8-all-languages.zip
unzip phpMyAdmin-4.1.8-all-languages.zip
\mv phpMyAdmin-4.1.8-all-languages /var/www/htmlphpmyadmin
\rm -r phpMyAdmin-4.1.8-all-languages.zip
chmod -R 777 *


cd /var/www/html/
wget https://cn.wordpress.org/wordpress-4.5.1-zh_CN.zip
unzip wordpress-4.5.1-zh_CN.zip
\cp -r wordpress/. ./
\rm -r wordpress 
chmod -R 777 *



# install vsftpd
yum install vsftpd
service vsftpd restart

# config file
vim /etc/vsftpd/vsftpd.conf
# check main path of vsftpd
more /etc/passwd|grep ftp
# update password of default ftp user 'ftp'
passwd ftp





